<?php

use Illuminate\Database\Eloquent\Model;

class imagesModel extends Model
{
    protected $table = 'images';
    protected $primaryKey = 'id';

    protected function serializeDate($date)
    {
        return $date->format('Y-m-d H:i:s');
    }

    public function cat()
    {
        return $this->belongsTo(imagescatModel::class, 'cat_id', 'id');
    }

}